<?php
require_once "LoginView.php";

class PageView{
	
	public function Page($title, $header, $body) {
		$title = 'You Know What Time It Is';
		$pageHTML = "<html>
		<head>
		<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
		<link rel='stylesheet' type='text/css' href='css/style.css' />
		<link href='http://fonts.googleapis.com/css?family=Fredoka+One' rel='stylesheet' type='text/css'>
		<title>$title</title>
		</head>
		<header>$header</header>
		<body><div id='login'><h2>Tjenixen</h2>$body</div></body>
		</html>";
	
		return $pageHTML;
		}
	
	
	
	public function MenuPost(){
		
		$pagePost = "<li><a href='Post.php'>Post</a></li>";
		return $pagePost;
	}
	
	public function LoginHeader() {
		$header = "<div id='header''><div id='logo'></div><div id='menu'>
		<ul>
		<li class='active'><a href='?Login'>Login</a></li>
		<li><a href='?Register''>Register</a></li>
		<li><a href='?Post'>Post</a></li>
		</ul>
		</div>
		</div>";
		return $header;
	}
	
	public function RestrictedLoginHeader() {
		$header = "<div id='header''><div id='logo'></div><div id='menu'>
		<ul>
	<li class='active'><a href='?Login'>Login</a></li>
	<li><a href='?Register''>Register</a></li>
	</ul>
	</div>
	</div>";
		return $header;
	}
	
	public function RestrictedRegisterHeader() {
		$header = "<div id='header''><div id='logo'></div><div id='menu'>
		<ul>
		<li><a href='?Login'>Login</a></li>
		<li class='active'><a href='?Register''>Register</a></li>
		</ul>
		</div>
		</div>";
		return $header;
	}
	
public function RegisterHeader() {
		$header = "<div id='header''><div id='logo'></div><div id='menu'>
		<ul>
		<li><a href='?Login'>Login</a></li>
		<li class='active'><a href='?Register''>Register</a></li>
		<li><a href='?Post'>Post</a></li>
		</ul>
		</div>
		</div>";
		return $header;
	}
	
public function PostHeader() {
		$header = "<div id='header''><div id='logo'></div><div id='menu'>
		<ul>
		<li><a href='?Login'>Login</a></li>
		<li><a href='?Register''>Register</a></li>
		<li  class='active'><a href='?Post'>Post</a></li>
		</ul>
		</div>
		</div>";
		return $header;
	}
	
	public function LoggedInAs()
	{
		$lv = new LoginView();
		$loggedinas = "<div id='loggedIn'>Inloggad som: ".$lv->GetUserName()."</div>";
			
		return $loggedinas;
	}
	
}
	
?>